package de.baumann.browser.api.net

import de.baumann.browser.api.net.base.BaseUrl
import de.baumann.browser.api.net.vo.CanCreatePool
import de.baumann.browser.api.net.vo.Result
import io.reactivex.Observable
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

@BaseUrl(ApiKey.POOL_MODULE)
interface PoolApiService {

    @POST(ApiKey.CAN_CREATE_POOL)
    fun canCreatePool(): Observable<Result<CanCreatePool>>

    @FormUrlEncoded
    @POST(ApiKey.CREATE_POOL)
    fun createPool(@Field("phone") phone: String,
                   @Field("code") code: String,
                   @Field("countryCode") countryCode: Int): Observable<Result<Any>>

}